import type {  ResultModel, PageResultModel, ExpansionBoxModel} from '@/api/model/model'
import request from '@/utils/request'


// export const queryExpansionBoxPageApi = (pn: Number, pz: Number) => {
//   console.log(pn,pz);
//   request.get<any, PageResultModel>(`/expansionBox/expansionBoxList/${pn}/${pz}`)

//   // con

// }

export const queryExpansionBoxPageApi = (pn: number, pz: number) => {
  console.log(pn, pz);
  return request.get<any, PageResultModel>(`/expansionBox/expansionBoxList/${pn}/${pz}`);
}
  

//根据ID查询armor
export const queryExpansionBoxByIdApi = (id: number) => request.get<any, ResultModel>(`/expansionBox/getExpansionBoxById/${id}`)

export const updateApi = (expansionBox:ExpansionBoxModel) => request.post<any, ResultModel>(`/expansionBox/expansionBoxAddOrUpdate`, expansionBox)
export const addApi = (expansionBox:ExpansionBoxModel) => request.post<any, ResultModel>(`/expansionBox/expansionBoxAddOrUpdate`, expansionBox)

export const deleteApi = (id: number) => request.delete<any, ResultModel>(`/expansionBox/expansionBoxDelById/${id}`)
export const batchDeleteApi = (ids: (number| undefined)[]) => request.post<any, ResultModel>(`/expansionBox/expansionBoxBatchDelById`,ids)